FROM omega8/openresty-ext:latest
MAINTAINER omega
USER root
EXPOSE 8080

RUN mkdir -p /usr/local/openresty/nginx/html/_ah && \
    echo "healthy" > /usr/local/openresty/nginx/html/_ah/health
RUN sed -i -s "s/listen\s*80;/listen 8080;/" /usr/local/openresty/nginx/conf/nginx.conf

CMD ["/bin/sh", "-c", "cd /usr/local/openresty/nginx/sbin && ./nginx -g 'daemon off;'"]